<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<ul id="navigation">
	<li><a href="task-create.htm">Create a new task</a></li>
	<li><a href="signout.htm">Logout</a></li>
</ul>

<div id="toDoList" class="taskList">
	<h3>To do</h3>
	<table cellspacing="0">
		<c:forEach items="${toDoList}" var="task">
		<tr>
			<td><a href="task-view-${task.id}.htm">${task.description}</a></td>
			<td>${task.dueDate}</td>
			<td>Created by: ${task.createdBy.forename} ${task.createdBy.surname}</td>
		</tr>
		</c:forEach>
	</table>
</div>

<div id="toBeDoneList" class="taskList">
	<h3>To be done</h3>
	<table cellspacing="0">
		<c:forEach items="${toBeDoneList}" var="task">
		<tr>
			<td><a href="task-view-${task.id}.htm">${task.description}</a></td>
			<td>${task.dueDate}</td>
			<td>Assigned to: ${task.assignedTo.forename} ${task.assignedTo.surname}</td>
		</tr>
		</c:forEach>
	</table>
</div>
